<?php
error_reporting(E_ERROR);
ini_set('display_errors', 1);
function encode_img($img) {
  	     $fd = fopen ($img, 'rb');
  	     $size=filesize ($img);
  	     $cont = fread ($fd, $size);
  	     fclose ($fd);
  	     $encimg = base64_encode($cont);
 	     return $encimg;
} 
require_once("../../WEBSERVICE/libs/nusoap.php"); 
$wsdl="http://checkflayer/demo/ws/server.php?wsdl";
$client=new soapclient($wsdl, 'wsdl');
$image = '../images/info.jpg';
$foto = encode_img($image);
die($foto);
$param=array('codice'=>'aaa2', 'coord_x'=>10.317090, 'coord_y'=>44.795910, 'foto'=>$foto);
echo $client->call('putCoordinate', $param);
?>